libxc: correct handling of switch_qemu_logdirty callback return value
authorIan Campbell <ian.campbell@citrix.com>
Mon, 25 Oct 2010 17:15:28 +0000 (18:15 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 25 Oct 2010 17:15:28 +0000 (18:15 +0100)
The callback return convention follows xc_domain_save and therefore
returns 0 on success and >0 on error, correct the check accordingly.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_domain_save.c

index 47f8a79c9d54f9e9c58463032a5885d80bf634aa..eee8fb47d229abe63194139a3d0e1f7731e3acd8 100644 (file)
@@ -1015,7 +1015,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         }
 
         /* Enable qemu-dm logging dirty pages to xen */
-        if ( hvm && !callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) )
+        if ( hvm && callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) )
         {
             PERROR("Couldn't enable qemu log-dirty mode (errno %d)", errno);
             goto out;
@@ -1879,7 +1879,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                XEN_DOMCTL_SHADOW_OP_OFF,
                                NULL, 0, NULL, 0, NULL) < 0 )
             DPRINTF("Warning - couldn't disable shadow mode");
-        if ( hvm && !callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) )
+        if ( hvm && callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) )
             DPRINTF("Warning - couldn't disable qemu log-dirty mode");
     }